/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.superduperbudget.central.iconfix;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import se.superduperbudget.central.util.Base64;

/**
 *
 * @author tomas
 */
public class ByteArrayAdapter extends XmlAdapter<String, byte[]> {

    @Override
    public byte[] unmarshal(String vt) throws Exception {
        return Base64.decode(vt);
    }

    @Override
    public String marshal(byte[] bt) throws Exception {
        return Base64.encodeBytes(bt);
    }


   
    
}
